import request from '@/utils/request'

export function getExamList(data) {
  return request({
    url: '/getExamForUser',
    method: 'post',
    data,
  })
}
//开始考试
export function startTest(id) {
  return request({
    url: `/startTest?id=${id}`,
    method: 'get',
  })
}
//暂停考试
export function suspendTest(data) {
  return request({
    url: '/suspendTest',
    method: 'post',
    data,
  })
}
//结束考试
export function stopTest(data) {
  return request({
    url: '/stopTest',
    method: 'post',
    data,
  })
}
//收藏列表
export function getMyCollection(data) {
  return request({
    url: '/getMyCollection',
    method: 'post',
    data,
  })
}

export function getTestInfo(data) {
  return request({
    url: '/getTest',
    method: 'post',
    data,
  })
}
export function setCollection(data) {
  return request({
    url: '/setCollection',
    method: 'post',
    data,
  })
}

export function getComment(data) {
  return request({
    url: '/getComment',
    method: 'post',
    data,
  })
}

export function getRecord(data) {
  return request({
    url: '/getRecord',
    method: 'post',
    data,
  })
}

export function setComment(data) {
  return request({
    url: '/setComment',
    method: 'post',
    data,
  })
}